import React from 'react';
import eventBus from "../07非父子組件通信EventBus/utils/event-bus";

class Lucy extends React.Component {
    render() {
        const {message, call} = this.props;
        return (
            <div>
                Lucy, {message},
                <button onClick={() => call('yes')}>say</button>
                <button onClick={e => eventBus.emit('chat', 'Lucy')}>Chart</button>
            </div>
        )
    }
}
export default Lucy